﻿
//Author: 张亚涛
//createtime:2016-01-03 23:23:32
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class SmsCode
    {
        public SmsCode()
        { }
        public SmsCode(IDataReader reader)
        {
            _id = long.Parse(reader["ID"].ToString());
            if (reader["Mobile"] != DBNull.Value)
            {
                _mobile = reader["Mobile"].ToString();
            }
            if (reader["Code"] != DBNull.Value)
            {
                _code = reader["Code"].ToString();
            }
            if (reader["SendTime"] != DBNull.Value)
            {
                _sendTime = DateTime.Parse(reader["SendTime"].ToString());
            }
        }

        #region 数据库字段
        private long? _id;
        private string _mobile;
        private string _code;
        private DateTime? _sendTime;
        #endregion

        #region 字段属性
        /// <summary>
        /// 
        /// </summary>
        public long? Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Mobile
        {
            set { _mobile = value; }
            get { return _mobile; }
        }
        /// <summary>
        /// 验证码
        /// </summary>
        public string Code
        {
            set { _code = value; }
            get { return _code; }
        }
        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTime? SendTime
        {
            set { _sendTime = value; }
            get { return _sendTime; }
        }
        #endregion
    }
}